package com.boss.fileapp.service;

import com.boss.fileapp.schedule.SalaryAutoReportTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * <br>Title:
 * <br>Description:
 * <br>Author:
 * <br>Date:
 */
//@Component
public class CronApplicationRunnerImpl implements ApplicationRunner {

    private static Logger logger = LoggerFactory.getLogger(SalaryAutoReportTask.class);

    @Autowired
    private AutoCronService autoCronService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        logger.info(" 初始化定时任务 ");
        autoCronService.initCronConfig();
    }
}
